import { createApp } from 'vue'
import App from './App.vue'
import router from './router/index'
import '@/styles/common.scss'
//导入 createPinia 函数
import { createPinia } from 'pinia'

//创建pinia实例
const pinia = createPinia()
//引入懒加载插件并且注册
import{ lazyPlugin} from '@/directives'

//引入全局组件
import {compontentPlugin} from '@/components'
//将pinia实例挂载到vue实例上
//以App作为参数创建一个vue实例，挂载到id为app的元素上
const app = createApp(App)
//use一次只能注册一个插件
app.use(router)
app.use(pinia)
app.use(lazyPlugin)
app.use(compontentPlugin)
app.mount('#app')


